<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>

<div id="app">
    <h1>array[json]数据的渲染</h1>
    <ul>
        <li v-for="item,index in items" :key="index">
            {{index}}={{item.message}}
        </li>
    </ul>
    <h1>json数据的渲染</h1>
    <ul>
        <li v-for="key,value in object" :key="key">
            {{key}}={{value}}
        </li>
    </ul>
</div>

<script>
    var app = new Vue({
        el: '#app',
        data: {
            items:[
                {message:'Foo'},
                {message:'Bar'}
            ],
            object:{
                title: '标题',
                author:'作者',
                publishedAt: '发版时间'

            }
        }
    })
</script>
